.class public abstract Lcom/ocpsoft/pretty/time/AbstractTimeUnit;
.super Ljava/lang/Object;
.source "AbstractTimeUnit.java"


# instance fields
.field protected format:Lcom/ocpsoft/pretty/time/TimeFormat;

.field protected locale:Ljava/util/Locale;

.field protected maxQuantity:J

.field protected millisPerUnit:J

.field protected name:Ljava/lang/String;

.field protected pluralName:Ljava/lang/String;


# direct methods
.method public constructor <init>(Ljava/util/Locale;)V
    .locals 8
    .parameter "locale"

    .prologue
    .line 39
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 35
    const-wide/16 v6, 0x0

    iput-wide v6, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->maxQuantity:J

    .line 36
    const-wide/16 v6, 0x1

    iput-wide v6, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->millisPerUnit:J

    .line 40
    iput-object p1, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->locale:Ljava/util/Locale;

    .line 44
    const-string v6, "com.ocpsoft.pretty.time.i18n.Resources"

    invoke-static {v6, p1}, Ljava/util/ResourceBundle;->getBundle(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/ResourceBundle;

    move-result-object v0

    .line 46
    .local v0, bundle:Ljava/util/ResourceBundle;
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "Pattern"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 47
    .local v5, pattern:Ljava/lang/String;
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "FuturePrefix"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 48
    .local v1, futurePrefix:Ljava/lang/String;
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "FutureSuffix"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 49
    .local v2, futureSuffix:Ljava/lang/String;
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "PastPrefix"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 50
    .local v3, pastPrefix:Ljava/lang/String;
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "PastSuffix"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 51
    .local v4, pastSuffix:Ljava/lang/String;
    new-instance v6, Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    invoke-direct {v6}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;-><init>()V

    invoke-virtual {v6, v5}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;->setPattern(Ljava/lang/String;)Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    move-result-object v6

    invoke-virtual {v6, v1}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;->setFuturePrefix(Ljava/lang/String;)Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    move-result-object v6

    invoke-virtual {v6, v2}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;->setFutureSuffix(Ljava/lang/String;)Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    move-result-object v6

    invoke-virtual {v6, v3}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;->setPastPrefix(Ljava/lang/String;)Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    move-result-object v6

    invoke-virtual {v6, v4}, Lcom/ocpsoft/pretty/time/BasicTimeFormat;->setPastSuffix(Ljava/lang/String;)Lcom/ocpsoft/pretty/time/BasicTimeFormat;

    move-result-object v6

    iput-object v6, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->format:Lcom/ocpsoft/pretty/time/TimeFormat;

    .line 54
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "Name"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->name:Ljava/lang/String;

    .line 55
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->getResourceKeyPrefix()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "PluralName"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/ResourceBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, p0, Lcom/ocpsoft/pretty/time/AbstractTimeUnit;->pluralName:Ljava/lang/String;

    .line 56
    return-void
.end method


# virtual methods
.method protected abstract getResourceKeyPrefix()Ljava/lang/String;
.end method
